﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IrisGenerator.Common.Modules
{
    [global::System.AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
    public sealed class ModuleParameterAttribute : Attribute
    {
        public string Name { get; private set; }
        public string Type { get; private set; }
        public bool Mandatory { get; private set; }
        public ModuleParameter ModuleParameter { get; private set; }
        public ModuleParameterDirection Direction { get; private set; }

        public ModuleParameterAttribute(string name, string type, bool mandatory, ModuleParameterDirection direction)
        {
            this.ModuleParameter = new ModuleParameter();
            this.ModuleParameter.ModParName = name;
            this.ModuleParameter.ModParMandatory = mandatory;
            
            
            //this.Type = type;
            //this.Mandatory = mandatory;
            this.Direction = direction;
        }

        public ModuleParameterAttribute(string name, string type) : this(name, type, false, ModuleParameterDirection.Input) { }
        public ModuleParameterAttribute(string name, string type, ModuleParameterDirection direction) : this(name, type, false, direction) { }
        public ModuleParameterAttribute(string name, string type, bool mandatory) : this(name, type, mandatory, ModuleParameterDirection.Input) { }
        
    }
}
